package org.gd.hellojavacore.enums;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;

public class Main {

    public static void main(String...str) throws NoSuchFieldException {

        Class clazz = AnnotatedEnum.valueOf("E1").getClass();

        System.out.println(clazz.getField("E1").getAnnotation(XmlEnumValue.class));

        Annotation annotationXmlEnum = clazz.getAnnotation(XmlEnum.class);
        System.out.println(clazz.isAnnotationPresent(XmlEnum.class));
        System.out.println(annotationXmlEnum);

    }

}
